import { createStore } from 'vuex'

interface data {
  count: number
}

export const store = createStore({
  // 通过限定传入的参数类型
  state: (): data => {
    // 必须要有返回
    return {
      count: 0
    }
  },
  mutations: {
    increment(state) {
      state.count++
    }
  },
  actions: {}
})
